package com.changzhi.common.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 元旦奖品类型
 * 
 * @author lxw
 *
 */
public enum PrizeTypeEnum implements IEnum<Integer> {

	FRAME(0, "头像框"),
	CAR(1, "座驾"),
	BUBBLE(2, "气泡框"),
	FLAME(3, "小火苗"),
	LAMP(4, "灯笼"),
	GIFT(5, "礼物"),
	PENDANT(6, "挂件");

	private Integer value;
	private String desc;

	PrizeTypeEnum(final Integer value, final String desc) {
		this.value = value;
		this.desc = desc;
	}


	@Override
	public Integer getValue() {
		return this.value;
	}

	public String getDesc() {
		return this.desc;
	}


	public static PrizeTypeEnum getEnum(Integer type){
		if(type == null){
			return null;
		}
		for (PrizeTypeEnum anEnum : PrizeTypeEnum.values()) {
			if(type.equals(anEnum.getValue())){
				return anEnum;
			}
		}
		return null;
	}
}
